//
//  HMCetegoryViewController.m
//  HMMeituan19HD
//
//  Created by 邢广 on 16/9/16.
//  Copyright © 2016年 xg. All rights reserved.
//

#import "HMCetegoryViewController.h"
#import "HMDropDownView.h"
#import "HMcetegoryModel.h"
 
@interface HMCetegoryViewController ()

@end

@implementation HMCetegoryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    HMDropDownView *dropDownV = [HMDropDownView dropDownView];
    [self.view addSubview:dropDownV];
     
    self.preferredContentSize = dropDownV.size;

    // 解析数据
    // 加载 plist
    NSArray *categoryList = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"categories.plist" ofType:nil]];
    
    dropDownV.cetegoryArray = [NSArray yy_modelArrayWithClass:NSClassFromString(@"HMcetegoryModel") json:categoryList];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
